//路由页面
import 'package:flutter/material.dart';
import 'package:test_xzkdemo/pages/userfor/first.dart';
import 'package:test_xzkdemo/pages/userfor/splash.dart';
import 'package:test_xzkdemo/pages/userfor/login.dart';
import 'package:test_xzkdemo/pages/function/home.dart';
import 'package:test_xzkdemo/pages/function/sortCity.dart';
import 'package:test_xzkdemo/pages/function/goodsdetail.dart';
import 'package:test_xzkdemo/pages/userfor/userinfo.dart';
import 'package:test_xzkdemo/pages/function/xinshiMap.dart';
import 'package:test_xzkdemo/pages/function/xinshiMap2.dart';

class Router {
  static final routes = {
    // 从非toolbar页面（子页面）跳转到toolbar页面（主页）实现：
    // pushName到对应的路由，因为Toolbar是单例模式，所以只会创建一个
    // pushName之后，在ToolBar，initState中获取当前的路由，实现切换页面
    //对应的路径，类似html的跳转方式，字符串路径对应对象  SplashPage
   '/': (BuildContext context, {Object args}) => SplashPage(),
   '/first': (BuildContext context, {Object args}) => FirstPage(),
   '/login': (BuildContext context, {Object args}) => LoginPage(),
   '/home': (BuildContext context, {Object args}) => HomePage(),
   '/sortCity': (BuildContext context, {Object args}) => CitySelectRoute(),
   '/goodsdetail': (BuildContext context, {Object args}) => GoodsDetailPage(),
   '/userinfo': (BuildContext context, {Object args}) => UserInfoPage(),
   '/xinshiMap': (BuildContext context, {Object args}) => XinshiMapPage(),
   '/xinshiMap2': (BuildContext context, {Object args}) => XinshiMap2Page(),
  };

}
